ReaWild -- setup (Windows)
==================================


This turns bird call/song detections into coloured, labelled regions on a
REAPER timeline, so you can browse and confirm them by ear.

It uses BirdNET, which recognises around 6,500 species worldwide. It installs
BirdNET for you -- you don't need to find or set up anything yourself.

   On a Windows laptop with an ARM chip (Snapdragon, "Copilot+ PC"):
   ReaWild hasn't been tried on one yet. It needs Windows 11 24H2 or newer
   and the normal 64-bit REAPER. If something looks wrong, it's the tool,
   not you: press "Send feedback" at the bottom of the window.


This copy is the one for Windows, 64-bit. If that isn't what you're on,
download the right one from https://www.soundingwild.com/labs/reawild --
the tool will also tell you itself, the first time you run it.


1. Install REAPER if you don't already have it, or UPDATE it to the newest
   version if you do (REAPER: Help -> Check for updates):
   https://www.reaper.fm/download.php
   ReaWild puts each model's regions on their own row ("lane"), which only
   recent REAPER can do -- it was tested with REAPER 7.79. On an older
   REAPER it still works, but every model's regions share one row.
   REAPER itself is free to try.
   Pick "Windows 64-bit".

2. Put this whole folder in REAPER's own Scripts folder:
   - Open REAPER. In the Options menu, choose
     "Show REAPER resource path in explorer/finder...".
     A File Explorer window opens on REAPER's folder.
   - Open the "Scripts" folder in it (if there isn't one, make a folder
     with that name), and drag this whole folder, "ReaWild", into it.
   Don't move it after this step -- REAPER remembers where it lives.

   Inside, the "ReaWild files" folder holds everything ReaWild needs.
   Leave what's in it as it is.

3. In REAPER:
   - Go to the Actions menu -> Show action list...
   - Click "New action..." -> "Load ReaScript..."
   - In the Scripts folder, open "ReaWild" and pick "ReaWild.lua" -> Open.

4. It is now in the Action list, already selected. Click "Run".
   (Next time, run it from Actions -> Show action list... the same way, or
   put it on a toolbar.)

5. First run: it will probably say it needs something called ReaImGui.
   Click "Yes" to install it automatically, then FULLY QUIT REAPER -- close
   every REAPER window, and check the taskbar. Just closing the project
   window is NOT enough; REAPER won't notice the new extension until it
   restarts. Reopen it, then repeat step 4.
   - If it still asks for ReaImGui after a genuine quit-and-reopen, it will
     offer to email Axel the report. Say yes -- that sends far more than a
     screenshot could. Nothing is sent until you press send in your own
     email app.

6. Sign in. The first window asks for your ReaWild account.
   - No account yet? Click "Create an account" (or go to
     https://www.soundingwild.com/labs/reawild and press "Make a free
     account"). The account is ready straight away.
   - Type your email and password and click
     "Activate this computer". You need the internet for this once;
     after that ReaWild works offline.
   - One computer per account. To move to another computer, open
     the "Licence" panel at the bottom of the ReaWild window and press
     "Deactivate this computer" first, or remove the old one on your
     account page.

7. The window opens. If BirdNET isn't set up yet, that's the first thing it
   shows: click "Set up BirdNET automatically...". Before anything
   downloads it lists what it will install, how big each part is (about
   2.3 GB in all, plus up to 1 GB of temporary files) and how much free
   space your disk has, and asks whether there is room. Say yes and wait:
   it needs a real internet connection and a few minutes. You can keep
   using REAPER while it runs. Choosing Perch or BirdNET 3.0 later asks
   the same way before fetching their models.

   BirdNET, with its own copy of Python, goes into one folder of its own:
   AppData\Local\ReaWild in your user folder (Windows can't hold BirdNET's
   files any deeper). BirdNET 3.0's model goes in AppData\Roaming\birdnet.
   Nothing else on the computer changes, so no administrator password or
   permission prompt is needed. Every later version of ReaWild uses that
   same BirdNET.

   There are three listening models: BirdNET 2.4 (the proven one),
   BirdNET 3.0 (a newer preview) and Perch v2. For members, "Analyse" runs
   ALL of them, one after another, so you can compare them on the same
   recordings; on the free plan it runs the one picked at the top. The
   Model buttons at the top choose whose settings you see and change.
   BirdNET 3.0 needs its own one-click setup first (pick it at the top:
   about 1.2 GB in all, including a ~570 MB model fetched on its first
   analysis); until then the others run without it. Perch and BirdNET 3.0
   ask before fetching their models.

8. Save your REAPER project first (File -> Save project as...), in a
   folder for this recording site: ReaWild keeps its results beside the
   .RPP, and asks for this until the project is saved. (Just trying it
   out? Press "Try the demo" instead and skip to step 11.)

   Then the full window appears. In the "Site"
   section, give your recording site's coordinates: type them into
   "Latitude" and "Longitude" (decimal degrees, e.g. 45.68 and 13.77),
   paste them in any format into the box below, or click the map.
   South of the equator and west of Greenwich are NEGATIVE numbers --
   check the orange dot on the map is where you recorded.

   This is required, and it matters more than it looks: BirdNET builds its
   list of candidate species from where and when you recorded. Without it
   you get the full global list and a lot of nonsense.

   One REAPER project = one recording site. Start a new project for a
   different location rather than mixing them.

9. Add your audio files to the project, then press "Analyse". Each model
   runs in turn, and its regions appear as soon as it finishes. You can
   close the window meanwhile: open ReaWild again and it carries on.

   Every generated region name starts with "? ". That's deliberate: delete
   the "? " by hand once you've confirmed a bird by ear, and re-running the
   analysis will never overwrite or duplicate it.

10. Region lanes: each model's regions sit on their own lane in the ruler
   above the tracks, named after the model ("BirdNET 2.4", "BirdNET 3.0",
   "Perch v2"). To hide or show a lane, use the tick-boxes under "Region
   lanes" in ReaWild's window. Regions you made yourself are never hidden.

   Or put buttons on a REAPER toolbar: the "Toolbar actions" folder next
   to this file has one action per model plus one for all of them. Load
   them like step 3 (Actions -> Show action list -> New action... -> Load
   ReaScript...), then right-click a toolbar -> Customize toolbar... ->
   Add... and pick "ReaWild - Toggle ... lane". The button lights up while
   its lane is hidden.

11. Not sure where to start? Press "Try the demo" in the window. It opens a
   small project with five real bird calls, set up the recommended way.
   Two more demos are in the "Demo" folder next to this file, including
   one set up wrong on purpose to show the common mistakes.


Updating to a later version
---------------------------

The folder is always called "ReaWild" and the script "ReaWild.lua". The
version is shown in the title of ReaWild's window (and under "About").
This copy is 0.20.6.

When a new one arrives:

1. Close the ReaWild window (not while it is analysing or setting up
   BirdNET).
2. In the Scripts folder, delete the old "ReaWild" folder. (Windows would
   otherwise mix old files in with the new ones. BirdNET and your feedback
   copies aren't in it, so nothing you need is lost.) Then unzip the new
   one and drag its "ReaWild" folder into the same Scripts folder.
3. Run ReaWild the usual way. It's the same action and the same toolbar
   buttons, so there is nothing to load again; the window title shows the
   new version.

BirdNET lives in AppData\Local\ReaWild, not in the "ReaWild" folder, so
nothing downloads again, and your settings and projects are untouched.

Coming from 0.20.4 or older (a folder with the version in its name, like
"ReaWild v0.20.4"): load the new script once (Actions -> Show action
list... -> New action... -> Load ReaScript..., then "ReaWild" ->
"ReaWild.lua"). It finds the BirdNET already installed and uses it. If that
BirdNET sits inside an older ReaWild folder (versions before 0.20.4 kept it
there), leave that folder where it is. You can remove the old entry from
the Actions list (select it, then Delete). If you put the lane buttons on a
toolbar, load them again from "ReaWild" -> "Toolbar actions" the same way,
so later updates keep them working too.

You can delete the old "ReaWild v0.20.4" folder: from 0.20.4 on, BirdNET
is already in AppData\Local\ReaWild, so nothing downloads again. (Only if
your BirdNET sat inside an older folder, from before 0.20.4, does deleting
it mean the new version sets BirdNET up once more, in AppData\Local\ReaWild,
and every later version keeps using it.)

Something wrong, or an idea?
----------------------------

Press "Send feedback" at the bottom of the window. Choose "Something went
wrong" or "An idea for something better", type a line in your own words, and
press "Open email".

Your normal email app opens with everything already filled in -- the version,
the paths, the settings and the last lines of the log. Add anything else you
want and press send. Nothing leaves your machine until you do.

A copy is also saved in AppData\Local\ReaWild (in your user folder) as
"reawild-feedback-<date>.txt", so you can attach it or send it another way
if you prefer.
